function exitFunc() {
    printf("exiting!\n");
}

function main() {
    atexit(exitFunc);
}
